<?php /* @var $myanswers sfPropelPager */;?>
<?php /* @var $answer StatementAnswer */;?>
<div class="tabbed">
	<ul class="tabs">
		<li id="tab-myprofile_perfectoppositeof" class="tab<?php echo $active_tab == 'perfectoppositeof' ? ' active' : ''?>">I'm the perfect opposite of...</li>
		<li id="tab-myprofile_respectedby" class="tab<?php echo $active_tab == 'respectedby' ? ' active' : ''?>">I'm respected by</li>
	</ul>

	<div id="myprofile_perfectoppositeof" class="content<?php echo $active_tab == 'respectedby' ? ' hide' : ''?>">
		<?php if($reversed_opposites): ?>
		<ul class="small-people-list group">
			<?php foreach($reversed_opposites as $opposite):?>
			<?php /* @var $opposite Opposite */ ?>
			<li>
				<div class="avatar">
					<?php
						$className = $opposite->getShowProfile() == 1 ? 'class=profile profile-'.$opposite->getId() : '';
						echo image_tag($opposite->getThumbnailUrl(), 'alt='.$opposite->getName().' '.$className);
					?>
				</div>
				<div class="group">
					<span class="name">
						<strong><?php echo $opposite->getName()?></strong>
						<?php if($opposite->getCountry() || $opposite->getOrigin()):?>
							(<?php if($opposite->getCountry()) echo $opposite->getCountry()?>
							<?php if($opposite->getCountry() && $opposite->getOrigin()):?> - <?php endif;?>
							<?php if($opposite->getOrigin()): ?><em><?php echo $opposite->getOrigin()?></em><?php endif; ?>)
						<?php endif; ?>
					</span>
					<?php
						$percentage = $user->getOppositenessWith($opposite);
						$className  = Round(Round($percentage)/10) * 10;
					?>
					<span class="oppositeness-<?php echo $className?>"><?php echo Round($percentage) ?>%</span>
					<span class="respects">
						<?php echo $opposite->getNumRespects() ? $opposite->getNumRespects() : '0' ?> &times;
						<img src="http://<?php echo $basehost?>/images/gadget/respect-icon-wbg.gif" alt="Respect" />
					</span>
				</div>
			</li>
			<?php endforeach?>		
		</ul>
		<?php else: ?>
			<p>Nobody has chosen you as their perfect opposite yet.</p>
		<?php endif; ?>
	</div>
	

	<div id="myprofile_respectedby" class="content<?php echo $active_tab == 'perfectoppositeof' ? ' hide' : ''?>">
	<?php if($respectedby_users): ?>
		<ul class="small-people-list group">
			<?php foreach($respectedby_users as $otheruser):?>
			<?php /* @var $otheruser User */ ?>
			<li>
				<div class="avatar">
					<?php
						$className = $otheruser->getShowProfile() == 1 ? 'class=profile profile-'.$otheruser->getId() : '';
						echo image_tag($otheruser->getThumbnailUrl(), 'alt='.$otheruser->getName().' '.$className);
					?>
				</div>
				<div class="group">
					<span class="name">
						<strong><?php echo $otheruser->getName()?></strong>
						<?php if($otheruser->getCountry() || $otheruser->getOrigin()):?>
							(<?php if($otheruser->getCountry()) echo $otheruser->getCountry()?>
							<?php if($otheruser->getCountry() && $otheruser->getOrigin()):?> - <?php endif;?>
							<?php if($otheruser->getOrigin()): ?><em><?php echo $otheruser->getOrigin()?></em><?php endif; ?>)
						<?php endif; ?>
					</span>
					<?php
						$percentage = $user->getOppositenessWith($otheruser);
						$className  = Round(Round($percentage)/10) * 10;
					?>
					<span class="oppositeness-<?php echo $className?>"><?php echo Round($percentage) ?>%</span>
					<span class="respects">
						<?php echo $otheruser->getNumRespects() ? $otheruser->getNumRespects() : '0' ?> &times;
						<img src="http://<?php echo $basehost?>/images/gadget/respect-icon-wbg.gif" alt="Respect" />
					</span>
				</div>
			</li>
			<?php endforeach?>		
		</ul>
		<?php else: ?>
			<p>Nobody gave respect to any of your comments yet.</p>
		<?php endif; ?>		
	</div>
</div>